﻿using System.Collections.Generic;
using DevExpress.MailClient.Win.Forms.Data;
using Zero.DataLayer;
using Zero.DataLayer.Repository;
using Zero.POCO.Donnees;
using Zero.Presenter.Donnees;

namespace DevExpress.MailClient.Win.Modules.Donnees {



    public partial class Donnees : BaseModule, IVagueView{
        public List<Vague> vagues { get; set; }
        public override string ModuleName { get { return Properties.Resources.ContactsName; } }
        public Donnees() {
            InitializeComponent();
            var vaguepresenter = new VaguePresenter(this, new VagueRepository());
            vaguepresenter.Display();

            if (vagues != null)
                gcVague.DataSource = vagues;
            else gcVague.DataSource = new List<Vague>();
            gvVague.Columns[0].Visible = false;
            gvVague.Columns[3].Visible = false;
            gvVague.Columns[6].Visible = false;
            gvVague.Columns[5].Visible = false;

            gvVague.Columns[7].Visible = false;
            gvVague.Columns[8].Visible = false;
            gvVague.Columns[9].Visible = false;
            gvVague.Columns[10].Visible = false;
            gvVague.Columns[11].Visible = false; 
            gvVague.Columns[12].Visible = false;
            gvVague.Columns[13].Visible = false;
            gvVague.Columns[14].Visible = false;
            gvVague.Columns[15].Visible = false;
            gvVague.Columns[16].Visible = false;
            gvVague.Columns[17].Visible = false;
            gvVague.Columns[18].Visible = false;
            gvVague.Columns[19].Visible = false;
            gvVague.Columns[20].Visible = false;

            gvVague.Columns[21].Visible = false;
            gvVague.Columns[22].Visible = false;
            gvVague.Columns[23].Visible = false;
            gvVague.Columns[24].Visible = false;

            gvVague.Columns[25].Visible = false;
            gvVague.Columns[26].Visible = false;
            gvVague.Columns[27].Visible = false;
            gvVague.Columns[28].Visible = false;
            gvVague.Columns[29].Visible = false;
            gvVague.Columns[30].Visible = false;
            gvVague.Columns[31].Visible = false;


            gvVague.Columns[32].Visible = false;
            gvVague.Columns[33].Visible = false;
            gvVague.Columns[34].Visible = false;
            gvVague.Columns[35].Visible = false;
            gvVague.Columns[36].Visible = false;
            gvVague.Columns[37].Visible = false;
            gvVague.Columns[38].Visible = false;


            gvVague.Columns[39].Visible = false;
            gvVague.Columns[40].Visible = false;
            gvVague.Columns[41].Visible = false;
            //gcVague.DataSource = DataHelper.Contacts;
            //gvVague.ShowFindPanel();
        }
      
        protected internal override void ButtonClick(string tag) {
            switch(tag) {
                case TagResources.ChargerDonnees:
                    UploadData();
                    break;

            }
        }

        private void UploadData()
        {
            frmUploadData form=new frmUploadData();
            form.ShowDialog(this);
        }
    }
}
